package com.RMP
{
    import com.util.*;
    import flash.display.*;
    import flash.events.*;
    import com.greensock.*;

    public class PracContainerShell extends Sprite
    {
        var btnsArray:Array;
        var xmlLoader:XMLLoader;
        var currShell:String;
        var fadeSpeed:Number;
        var practiceType:String;
        var prevNavId:int;
        var projDescShell:ProjDescShell;
        var projId:int;
        var shellInit:Boolean = false;
        var navList:XMLList;
        var multiImgShell:ProjMultiImgShell;
        var projVidThumbShell:ProjVidThumbShell;
        var currNavId:int;
        var recentImgShell:RecentImgShell;
        var myRoot:MovieClip;
        var prevShell:String;
        var audioNavShell:AudioNavShell;
        var relatedShell:ProjRelatedShell;
        var bookmarkNavItem:BookmarkNavItem;
        var longText:LongText;
        public var myXML:XML;
        var navListLength:int;
        var shellsArray:Array;
        var navItem:NavItem;

        public function PracContainerShell(param1:MovieClip, param2:Number, param3:int, param4:int) : void
        {
            shellInit = false;
            trace("PRACTICE CONTAINER SHELL");
            myRoot = param1;
            fadeSpeed = param2;
            currShell = null;
            prevShell = null;
            projId = param3;
            currNavId = param4;
            xmlLoad();
            myRoot.stage.addEventListener(Event.RESIZE, onResizer, false, 0, true);
            doResize();
            return;
        }

        function updateBookmark() : void
        {
            if (btnsArray[navListLength].inLightbox == true)
            {
                myRoot.removeFromBookmarks(projId, null);
                btnsArray[navListLength].field.text = "Bookmark +";
                btnsArray[navListLength].inLightbox = false;
            }
            else
            {
                myRoot.addToBookmarks(projId, null);
                btnsArray[navListLength].field.text = "Bookmark -";
                btnsArray[navListLength].inLightbox = true;
            }
            myRoot.updateBookmark();
            return;
        }

        function doResize() : void
        {
            var _loc_1:int = 0;
            if (longText != null)
            {
                longText.x = Math.round(4 * (myRoot.unitW + myRoot.gutterW));
                longText.y = Math.round(myRoot.headerH + (myRoot.unitH + myRoot.gutterH) - 4 * myRoot.unitW / 75);
                var _loc_2:* = myRoot.unitW / 75;
                longText.field.scaleY = myRoot.unitW / 75;
                longText.field.scaleX = _loc_2;
            }
            if (btnsArray != null)
            {
                _loc_1 = 0;
                while (_loc_1 < (btnsArray.length - 1))
                {
                    
                    var _loc_2:* = myRoot.unitW / 75;
                    btnsArray[_loc_1].field.scaleY = myRoot.unitW / 75;
                    btnsArray[_loc_1].field.scaleX = _loc_2;
                    btnsArray[_loc_1].bg.width = myRoot.unitW;
                    btnsArray[_loc_1].bg.height = btnsArray[_loc_1].field.height;
                    btnsArray[_loc_1].x = Math.round(8 * (myRoot.unitW + myRoot.gutterW) - 3 * myRoot.unitW / 75);
                    btnsArray[_loc_1].y = Math.round(myRoot.headerH + (myRoot.unitH + myRoot.gutterH) + -5 * myRoot.unitW / 75 + 14 * _loc_1 * myRoot.unitW / 75);
                    _loc_1++;
                }
                var _loc_2:* = myRoot.unitW / 75;
                btnsArray[(btnsArray.length - 1)].field.scaleY = myRoot.unitW / 75;
                btnsArray[(btnsArray.length - 1)].field.scaleX = _loc_2;
                btnsArray[(btnsArray.length - 1)].bg.width = myRoot.unitW;
                btnsArray[(btnsArray.length - 1)].bg.height = btnsArray[(btnsArray.length - 1)].field.height;
                btnsArray[(btnsArray.length - 1)].x = Math.round(4 * (myRoot.unitW + myRoot.gutterW));
                btnsArray[(btnsArray.length - 1)].y = Math.round(myRoot.headerH + (myRoot.unitH + myRoot.gutterH) + -5 * myRoot.unitW / 75 + 14 * 7 * myRoot.unitW / 75);
            }
            if (projDescShell != null)
            {
                projDescShell.y = 0;
            }
            return;
        }

        function xmlProgress(event:XMLProgressEvent) : void
        {
            return;
        }

        function btnRollOver(event:MouseEvent) : void
        {
            if (event.currentTarget.idNum != currNavId)
            {
                TweenMax.to(event.currentTarget, fadeSpeed, {tint:myRoot.overColor, alpha:1, overwrite:true});
            }
            else
            {
                TweenMax.to(event.currentTarget, fadeSpeed, {tint:myRoot.hotColor, alpha:1, overwrite:true});
            }
            if (event.currentTarget.idNum == navListLength)
            {
                if (btnsArray[navListLength].inLightbox == true)
                {
                    btnsArray[navListLength].field.text = "Bookmark -";
                }
                else
                {
                    btnsArray[navListLength].field.text = "Bookmark +";
                }
            }
            return;
        }

        function buildLongTitle(param1:String) : void
        {
            longText = new LongText(myRoot, param1);
            longText.alpha = 0;
            addChild(longText);
            doResize();
            TweenMax.to(longText, fadeSpeed, {alpha:1, overwrite:true});
            return;
        }

        function fadeInCover() : void
        {
            TweenMax.to(shellsArray[currNavId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[currNavId].coverSprite.visible = false;
                return;
            }
            });
            return;
        }

        function onResizer(event:Event)
        {
            doResize();
            return;
        }

        function createNewDescShell(param1:int) : void
        {
            var showBorder:Boolean;
            var incomingId:* = param1;
            switch(String(navList[incomingId]))
            {
                case "Acceptance Speech":
                {
                    if (myXML.thumbnails.@dBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    if (shellsArray[prevNavId].image != null)
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Acceptance Speech")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, "", showBorder);
                        projDescShell.incomingBitmap(shellsArray[prevNavId].image);
                    }
                    else
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Acceptance Speech")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].coverSprite.alpha = 1;
                    shellsArray[incomingId].coverSprite.visible = true;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    TweenMax.to(shellsArray[incomingId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[incomingId].coverSprite.visible = false;
                return;
            }
            });
                    break;
                }
                case "Speech":
                {
                    if (myXML.thumbnails.@detail != undefined)
                    {
                        if (myXML.thumbnails.@dBorder == "1" || myXML.thumbnails.@tBorder == "1")
                        {
                            showBorder;
                        }
                        else
                        {
                            showBorder;
                        }
                    }
                    else if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    if (shellsArray[prevNavId].image != null)
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Speech")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, "", showBorder);
                        projDescShell.incomingBitmap(shellsArray[prevNavId].image);
                    }
                    else
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Speech")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    }
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].coverSprite.alpha = 1;
                    shellsArray[incomingId].coverSprite.visible = true;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    TweenMax.to(shellsArray[incomingId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[incomingId].coverSprite.visible = false;
                return;
            }
            });
                    break;
                }
                case "Biography":
                {
                    if (myXML.thumbnails.@dBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    if (shellsArray[prevNavId].image != null)
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Biography")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, "", showBorder);
                        projDescShell.incomingBitmap(shellsArray[prevNavId].image);
                    }
                    else
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Biography")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    }
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].coverSprite.alpha = 1;
                    shellsArray[incomingId].coverSprite.visible = true;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    TweenMax.to(shellsArray[incomingId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[incomingId].coverSprite.visible = false;
                return;
            }
            });
                    break;
                }
                case "Info":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    if (shellsArray[prevNavId].image != null)
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Info")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, "", showBorder);
                        projDescShell.incomingBitmap(shellsArray[prevNavId].image);
                    }
                    else
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Info")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@main, showBorder);
                    }
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].coverSprite.alpha = 1;
                    shellsArray[incomingId].coverSprite.visible = true;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    TweenMax.to(shellsArray[incomingId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[incomingId].coverSprite.visible = false;
                return;
            }
            });
                    break;
                }
                case "Professional Affiliations":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1" || myXML.thumbnails.@iBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    if (shellsArray[prevNavId].image != null)
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Professional Affiliations")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, "", showBorder);
                        projDescShell.incomingBitmap(shellsArray[prevNavId].image);
                    }
                    else
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Professional Affiliations")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    }
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].coverSprite.alpha = 1;
                    shellsArray[incomingId].coverSprite.visible = true;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    TweenMax.to(shellsArray[incomingId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[incomingId].coverSprite.visible = false;
                return;
            }
            });
                    break;
                }
                case "Press Release":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    if (shellsArray[prevNavId].image != null)
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Press Release")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, "", showBorder);
                        projDescShell.incomingBitmap(shellsArray[prevNavId].image);
                    }
                    else
                    {
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Press Release")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@main, false);
                    }
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].coverSprite.alpha = 1;
                    shellsArray[incomingId].coverSprite.visible = true;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    TweenMax.to(shellsArray[incomingId].coverSprite, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                shellsArray[incomingId].coverSprite.visible = false;
                return;
            }
            });
                    break;
                }
                default:
                {
                    break;
                }
            }
            shellsArray[incomingId].incomingBitmap(shellsArray[prevNavId].image);
            return;
        }

        public function switchShells(param1:int) : void
        {
            var btnsArrayLength:int;
            var i:int;
            var oldObj:*;
            var oldObjSprite:*;
            var incomingId:* = param1;
            myRoot.registerPageHit(myRoot.pathNames[0] + "/" + practiceType + "/" + toLowercase(myXML.shortTitle + "/" + String(navList[incomingId])));
            if (navList[incomingId] == "PDF Download")
            {
                var _loc_4:int = 0;
                var _loc_5:* = myXML.tier0.tier1;
                var _loc_3:* = new XMLList("");
                for each (_loc_6 in _loc_5)
                {
                    
                    var _loc_7:* = _loc_5[_loc_4];
                    with (_loc_5[_loc_4])
                    {
                        if (@label == "PDF Download")
                        {
                            _loc_3[_loc_4] = _loc_6;
                        }
                    }
                }
                myRoot.downloadPDF(_loc_3.@url);
            }
            else
            {
                if (shellInit == true)
                {
                    prevNavId = currNavId;
                }
                else
                {
                    shellInit = true;
                }
                currNavId = incomingId;
                prevShell = currShell;
                switch(String(navList[incomingId]))
                {
                    case "Acceptance Speech":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Speech":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Biography":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Info":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Transcript":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Photographs":
                    {
                        currShell = "multiImgShell";
                        break;
                    }
                    case "Images":
                    {
                        currShell = "recentImgShell";
                        break;
                    }
                    case "Audio":
                    {
                        currShell = "audioNavShell";
                        break;
                    }
                    case "Video":
                    {
                        currShell = "projVidThumbShell";
                        break;
                    }
                    case "Professional Affiliations":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Press Release":
                    {
                        currShell = "projDescShell";
                        break;
                    }
                    case "Related":
                    {
                        currShell = "relatedShell";
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
                btnsArrayLength = btnsArray.length;
                i;
                while (i < btnsArrayLength)
                {
                    
                    if (i == currNavId)
                    {
                        if (btnsArrayLength > 1)
                        {
                            TweenMax.to(btnsArray[i], fadeSpeed, {tint:16724736, alpha:1, overwrite:true});
                        }
                    }
                    else
                    {
                        TweenMax.to(btnsArray[i], fadeSpeed, {tint:7763574, alpha:1, overwrite:true});
                    }
                    i = (i + 1);
                }
                if (prevShell == currShell && currShell == "projDescShell")
                {
                    if (shellsArray[prevNavId] != undefined)
                    {
                        oldObj = shellsArray[prevNavId];
                        oldObjSprite = shellsArray[prevNavId].coverSprite;
                        oldObjSprite.visible = true;
                        TweenMax.to(shellsArray[prevNavId].coverSprite, fadeSpeed, {alpha:1, overwrite:true, onComplete:function ()
            {
                if (shellsArray[currNavId] != undefined)
                {
                    oldObj.visible = false;
                    oldObj.alpha = 0;
                    oldObjSprite.visible = false;
                    oldObjSprite.alpha = 0;
                    shellsArray[currNavId].incomingBitmap(shellsArray[prevNavId].image);
                    shellsArray[currNavId].coverSprite.alpha = 1;
                    shellsArray[currNavId].coverSprite.visible = true;
                    shellsArray[currNavId].visible = true;
                    shellsArray[currNavId].alpha = 1;
                    fadeInCover();
                }
                else
                {
                    createNewDescShell(currNavId);
                    oldObj.visible = false;
                    oldObj.alpha = 0;
                    oldObjSprite.visible = false;
                    oldObjSprite.alpha = 0;
                }
                return;
            }
            });
                    }
                }
                else
                {
                    if (shellsArray[currNavId] != undefined)
                    {
                        if (currShell == "projDescShell")
                        {
                            shellsArray[currNavId].reloadImage();
                            shellsArray[currNavId].visible = true;
                            shellsArray[currNavId].fadeInShell();
                        }
                        else
                        {
                            shellsArray[currNavId].visible = true;
                            shellsArray[currNavId].fadeInShell();
                        }
                    }
                    else
                    {
                        createNewShell(currNavId);
                    }
                    if (shellsArray[prevNavId] != undefined && prevNavId != currNavId)
                    {
                        shellsArray[prevNavId].fadeOutShell();
                    }
                }
            }
            return;
        }

        function toLowercase(param1:String) : String
        {
            var _loc_2:String = null;
            var _loc_3:* = undefined;
            _loc_2 = "";
            _loc_3 = 0;
            while (_loc_3 < param1.length)
            {
                
                if (param1.charAt(_loc_3) == " ")
                {
                    _loc_2 = _loc_2 + "-";
                }
                else
                {
                    _loc_2 = _loc_2 + param1.charAt(_loc_3).toLowerCase();
                }
                _loc_3 = _loc_3 + 1;
            }
            return _loc_2;
        }

        function btnRollOut(event:MouseEvent) : void
        {
            if (event.currentTarget.idNum != currNavId || btnsArray.length == 1)
            {
                TweenMax.to(event.currentTarget, fadeSpeed, {tint:myRoot.coldColor, alpha:1, overwrite:true});
            }
            if (event.currentTarget.idNum == navListLength)
            {
                btnsArray[navListLength].field.text = "Bookmark";
            }
            return;
        }

        function btnClick(event:MouseEvent) : void
        {
            var e:* = event;
            if (e.currentTarget.idNum == navListLength)
            {
                btnsArray[navListLength].field.text = "Bookmark";
                updateBookmark();
            }
            else if (navList[e.currentTarget.idNum] == "PDF Download")
            {
                var _loc_4:int = 0;
                var _loc_5:* = myXML.tier0.tier1;
                var _loc_3:* = new XMLList("");
                for each (_loc_6 in _loc_5)
                {
                    
                    var _loc_7:* = _loc_5[_loc_4];
                    with (_loc_5[_loc_4])
                    {
                        if (@label == "PDF Download")
                        {
                            _loc_3[_loc_4] = _loc_6;
                        }
                    }
                }
                myRoot.downloadPDF(_loc_3.@url);
            }
            else
            {
                updateAddress(e.currentTarget.idNum);
            }
            return;
        }

        function xmlLoad() : void
        {
            xmlLoader = new XMLLoader();
            xmlLoader.addEventListener(XMLProgressEvent.PROGRESS, xmlProgress, false, 0, true);
            xmlLoader.addEventListener(XMLInitEvent.INIT_COMPLETE, xmlInit, false, 0, true);
            switch(myRoot.pathNames[1])
            {
                case "partners":
                {
                    practiceType = "partners";
                    xmlLoader.load(myRoot.path + "flash_support/partners_xml.php?id=" + projId);
                    break;
                }
                case "staff":
                {
                    practiceType = "staff";
                    xmlLoader.load(myRoot.path + "flash_support/partners_xml.php?id=" + projId);
                    break;
                }
                case "awards":
                {
                    practiceType = "awards";
                    xmlLoader.load(myRoot.path + "flash_support/awards_xml.php?id=" + projId);
                    break;
                }
                case "press":
                {
                    if (myRoot.pathNames[2] == "publications" || myRoot.pathNames[2] == "releases")
                    {
                        if (myRoot.pathNames[2] == "publications")
                        {
                            practiceType = "press/publications";
                        }
                        else if (myRoot.pathNames[2] == "releases")
                        {
                            practiceType = "press/releases";
                        }
                        xmlLoader.load(myRoot.path + "flash_support/generic_practice_xml.php?id=" + projId);
                    }
                    else
                    {
                        practiceType = "press/videos";
                        xmlLoader.load(myRoot.path + "flash_support/pressvideo_xml.php?id=" + projId);
                    }
                    break;
                }
                case "lectures":
                {
                    practiceType = "lectures";
                    xmlLoader.load(myRoot.path + "flash_support/generic_practice_xml.php?id=" + projId);
                    break;
                }
                case "selected-text":
                {
                    practiceType = "selected_text";
                    xmlLoader.load(myRoot.path + "flash_support/generic_practice_xml.php?id=" + projId);
                    break;
                }
                case "books":
                {
                    practiceType = "books";
                    xmlLoader.load(myRoot.path + "flash_support/generic_practice_xml.php?id=" + projId);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }

        function xmlInit(event:XMLInitEvent) : void
        {
            var _loc_2:XMLList = null;
            myXML = event.myXML;
            buildLongTitle(myXML.longTitle);
            _loc_2 = new XMLList(myXML.tier0.tier1.@label);
            buildNav(_loc_2);
            return;
        }

        function buildNav(param1:XMLList) : void
        {
            var _loc_2:int = 0;
            navList = param1;
            navListLength = navList.length();
            btnsArray = new Array();
            shellsArray = new Array();
            shellsArray.length = navListLength;
            _loc_2 = 0;
            while (_loc_2 < navListLength)
            {
                
                if (navList[_loc_2] == "Professional Affiliations")
                {
                    btnsArray[_loc_2] = new NavItem(myRoot, "Affiliations", "", _loc_2);
                }
                else
                {
                    btnsArray[_loc_2] = new NavItem(myRoot, navList[_loc_2], "", _loc_2);
                }
                btnsArray[_loc_2].addEventListener(MouseEvent.MOUSE_OVER, btnRollOver, false, 0, true);
                btnsArray[_loc_2].addEventListener(MouseEvent.MOUSE_OUT, btnRollOut, false, 0, true);
                btnsArray[_loc_2].addEventListener(MouseEvent.CLICK, btnClick, false, 0, true);
                btnsArray[_loc_2].alpha = 0;
                addChild(btnsArray[_loc_2]);
                TweenMax.to(btnsArray[_loc_2], fadeSpeed, {alpha:1, overwrite:true});
                _loc_2++;
            }
            if (myRoot.localPagesXML.page.@id.contains(projId))
            {
                btnsArray[navListLength] = new BookmarkNavItem(myRoot, "Bookmark", "", navListLength, true);
            }
            else
            {
                btnsArray[navListLength] = new BookmarkNavItem(myRoot, "Bookmark", "", navListLength, false);
            }
            btnsArray[navListLength].addEventListener(MouseEvent.MOUSE_OVER, btnRollOver, false, 0, true);
            btnsArray[navListLength].addEventListener(MouseEvent.MOUSE_OUT, btnRollOut, false, 0, true);
            btnsArray[navListLength].addEventListener(MouseEvent.CLICK, btnClick, false, 0, true);
            btnsArray[navListLength].alpha = 0;
            addChild(btnsArray[navListLength]);
            TweenMax.to(btnsArray[navListLength], fadeSpeed, {alpha:1, overwrite:true});
            doResize();
            switchShells(currNavId);
            return;
        }

        function imageBtnClickListener(event:ImageBtnClickEvent) : void
        {
            var _loc_2:int = 0;
            _loc_2 = 0;
            if (navList.contains("Photographs"))
            {
                _loc_2 = 0;
                while (_loc_2 < navList.length())
                {
                    
                    if (navList[_loc_2] == "Photographs")
                    {
                        updateAddress(_loc_2);
                        break;
                    }
                    _loc_2++;
                }
            }
            else if (navList.contains("Images"))
            {
                _loc_2 = 0;
                while (_loc_2 < navList.length())
                {
                    
                    if (navList[_loc_2] == "Images")
                    {
                        updateAddress(_loc_2);
                        break;
                    }
                    _loc_2++;
                }
            }
            else if (navList.contains("Video"))
            {
                _loc_2 = 0;
                while (_loc_2 < navList.length())
                {
                    
                    if (navList[_loc_2] == "Video")
                    {
                        updateAddress(_loc_2);
                        break;
                    }
                    _loc_2++;
                }
            }
            else if (navList.contains("Audio"))
            {
                _loc_2 = 0;
                while (_loc_2 < navList.length())
                {
                    
                    if (navList[_loc_2] == "Audio")
                    {
                        updateAddress(_loc_2);
                        break;
                    }
                    _loc_2++;
                }
            }
            return;
        }

        function createNewShell(param1:int) : void
        {
            var showBorder:Boolean;
            var incomingId:* = param1;
            switch(String(navList[incomingId]))
            {
                case "Acceptance Speech":
                {
                    if (myXML.thumbnails.@dBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Acceptance Speech")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Speech":
                {
                    if (myXML.thumbnails.@detail != undefined)
                    {
                        if (myXML.thumbnails.@dBorder == "1" || myXML.thumbnails.@tBorder == "1")
                        {
                            showBorder;
                        }
                        else
                        {
                            showBorder;
                        }
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Speech")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    }
                    else
                    {
                        if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1")
                        {
                            showBorder;
                        }
                        else
                        {
                            showBorder;
                        }
                        var _loc_4:int = 0;
                        var _loc_5:* = myXML.tier0.tier1;
                        var _loc_3:* = new XMLList("");
                        for each (_loc_6 in _loc_5)
                        {
                            
                            var _loc_7:* = _loc_5[_loc_4];
                            with (_loc_5[_loc_4])
                            {
                                if (@label == "Speech")
                                {
                                    _loc_3[_loc_4] = _loc_6;
                                }
                            }
                        }
                        projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@main, showBorder);
                    }
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Biography":
                {
                    if (myXML.thumbnails.@dBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Biography")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, showBorder);
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Info":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Info")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@main, showBorder);
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Photographs":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1" || myXML.thumbnails.@iBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    myRoot.menuShell.hRule3Off();
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Photographs")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    multiImgShell = new ProjMultiImgShell(myRoot, fadeSpeed, _loc_3.image, projId);
                    multiImgShell.hasSub = false;
                    shellsArray[incomingId] = multiImgShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Images":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tborder == "1" || myXML.thumbnails.@iBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Images")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    recentImgShell = new RecentImgShell(myRoot, fadeSpeed, _loc_3.image, projId);
                    shellsArray[incomingId] = recentImgShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Audio":
                {
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Audio")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    audioNavShell = new AudioNavShell(myRoot, fadeSpeed, _loc_3.item);
                    shellsArray[incomingId] = audioNavShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Video":
                {
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Video")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    projVidThumbShell = new ProjVidThumbShell(myRoot, fadeSpeed, _loc_3.item);
                    shellsArray[incomingId] = projVidThumbShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Professional Affiliations":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1" || myXML.thumbnails.@iBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Professional Affiliations")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@detail, false);
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Press Release":
                {
                    if (myXML.thumbnails.@mBorder == "1" || myXML.thumbnails.@tBorder == "1")
                    {
                        showBorder;
                    }
                    else
                    {
                        showBorder;
                    }
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Press Release")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    projDescShell = new ProjDescShell(myRoot, fadeSpeed, _loc_3, myXML.thumbnails.@main, false);
                    if (!navList.contains("Photographs") && !navList.contains("Images") && !navList.contains("Video") && !navList.contains("Audio"))
                    {
                        projDescShell.showBtn = false;
                    }
                    projDescShell.addEventListener(ImageBtnClickEvent.CLICKED, imageBtnClickListener, false, 0, true);
                    shellsArray[incomingId] = projDescShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    break;
                }
                case "Related":
                {
                    var _loc_4:int = 0;
                    var _loc_5:* = myXML.tier0.tier1;
                    var _loc_3:* = new XMLList("");
                    for each (_loc_6 in _loc_5)
                    {
                        
                        var _loc_7:* = _loc_5[_loc_4];
                        with (_loc_5[_loc_4])
                        {
                            if (@label == "Related")
                            {
                                _loc_3[_loc_4] = _loc_6;
                            }
                        }
                    }
                    relatedShell = new ProjRelatedShell(myRoot, fadeSpeed, _loc_3.item);
                    shellsArray[incomingId] = relatedShell;
                    shellsArray[incomingId].alpha = 0;
                    addChild(shellsArray[incomingId]);
                    doResize();
                    shellsArray[incomingId].fadeInShell();
                    myRoot.menuShell.hRule3On();
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }

        function updateAddress(param1) : void
        {
            switch(myRoot.pathNames[1])
            {
                case "partners":
                {
                    myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], param1];
                    myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + param1 + "/");
                    break;
                }
                case "staff":
                {
                    myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], myRoot.pathNames[4], myRoot.pathNames[5], param1];
                    myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + myRoot.pathNames[4] + "/" + myRoot.pathNames[5] + "/" + param1 + "/");
                    break;
                }
                case "awards":
                {
                    myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], param1];
                    myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + param1 + "/");
                    break;
                }
                case "press":
                {
                    if (myRoot.pathNames[2] == "publications" || myRoot.pathNames[2] == "releases")
                    {
                        myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], myRoot.pathNames[4], myRoot.pathNames[5], param1];
                        myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + myRoot.pathNames[4] + "/" + myRoot.pathNames[5] + "/" + param1 + "/");
                    }
                    else
                    {
                        myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], myRoot.pathNames[4], param1];
                        myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + myRoot.pathNames[4] + "/" + param1 + "/");
                    }
                    break;
                }
                case "lectures":
                {
                    myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], param1];
                    myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + param1 + "/");
                    break;
                }
                case "selected-text":
                {
                    myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], param1];
                    myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + param1 + "/");
                    break;
                }
                case "books":
                {
                    myRoot.clickPathNames = [myRoot.pathNames[0], myRoot.pathNames[1], myRoot.pathNames[2], myRoot.pathNames[3], myRoot.pathNames[4], param1];
                    myRoot.updateAddress("/" + myRoot.pathNames[0] + "/" + myRoot.pathNames[1] + "/" + myRoot.pathNames[2] + "/" + myRoot.pathNames[3] + "/" + myRoot.pathNames[4] + "/" + param1 + "/");
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }

    }
}
